<script setup>
import home from "@/store/home.js";
import {onMounted} from "vue";

const useHome = home()
const updateStateVal = () => {
  useHome.updateState({
    title: '首页'
  })
}
onMounted(() => {
  updateStateVal()
})
</script>

<template>
  <div class="demo">
    {{ useHome.title }}
  </div>
</template>